package cc.angis.xiugallery.data;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.List;

public class PostData {
	
	private int id;
	
	private String postId;
	
	private long imgId;
	
	private String content;
	
	private long postTime;
	
	private int commentCount;
	
	private CommentData lastComment;
	
	private List<PlatFormData> platformDataMap;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public long getImgId() {
		return imgId;
	}

	public void setImgId(long imgId) {
		this.imgId = imgId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public long getPostTime() {
		return postTime;
	}

	public void setPostTime(long postTime) {
		this.postTime = postTime;
	}


	public int getCommentCount() {
		return commentCount;
	}

	public void setCommentCount(int commentCount) {
		this.commentCount = commentCount;
	}
	
	public String getShowTime(){
		Calendar calendar = Calendar.getInstance();
		calendar.setTimeInMillis(postTime);
		String formatter = "yyyy-MM-dd HH:mm";
		return new SimpleDateFormat(formatter).format(calendar.getTime());
	}

	public CommentData getLastComment() {
		return lastComment;
	}

	public void setLastComment(CommentData lastComment) {
		this.lastComment = lastComment;
	}

	public String getPostId() {
		return postId;
	}

	public void setPostId(String postId) {
		this.postId = postId;
	}

	public List<PlatFormData> getPlatformDataMap() {
		return platformDataMap;
	}

	public void setPlatformDataMap(List<PlatFormData> platformDataMap) {
		this.platformDataMap = platformDataMap;
	}

}
